import React from "react";
import MyNavLink from "../MyNavLink";
import {Switch,Route,Redirect} from 'react-router-dom'
import Login from './Login'
import Register from './Register'
import "./index.css";
function Welcome() {
  return (
    <div className="welcomeBox">
      <div className="welcome">
        <div className="display">
          <span className="intro">使用TodoList</span>
          <span className="intro">做时间管理大师</span>
        </div>
        <div className="enter">
            <div className="enterBox">
                <div className="enterHeader">
                   <MyNavLink to="/welcome/login" className="welNav">登录</MyNavLink>
                   <MyNavLink to="/welcome/register" className="welNav">注册</MyNavLink>
                </div>
                <div className="enterBody">
                    <Switch>
                        <Route path="/welcome/login" component={Login}/>
                        <Route path="/welcome/register" component={Register}/>
                        <Redirect to="/welcome/login"/>
                    </Switch>
                </div>
            </div>
        </div>
      </div>
    </div>
  );
}
export default Welcome;
